package cn.wolfcode.p2p.bussness.service;

import cn.wolfcode.p2p.base.query.QueryObject;
import cn.wolfcode.p2p.bussness.domain.ExpAccount;
import cn.wolfcode.p2p.bussness.domain.ExpAccountFlow;
import com.github.pagehelper.PageInfo;

import java.math.BigDecimal;

public interface IExpAccountFlowService {
    int save(ExpAccountFlow expAccountFlow);

    int update(ExpAccountFlow expAccountFlow);

    ExpAccountFlow get(Long id);

    PageInfo queryPage(QueryObject qo);

    /**
     * 记录体验金流水
     * @param expAccount    体验金账户
     * @param amount        体验金账户
     */
    void createBidFlow(ExpAccount expAccount, BigDecimal amount);

    /**
     * 记录体验金二审投标失败流水
     * @param expAccount        体验金账户
     * @param availableAmount   体验金账户
     */
    void createAudit2Flow(ExpAccount expAccount, BigDecimal availableAmount);

    /**
     * 记录体验金二审投标成功流水
     * @param expAccount
     * @param availableAmount
     */
    void createAuditSuccessFlow(ExpAccount expAccount, BigDecimal availableAmount);

    /**
     * 记录回收体验金
     * @param bidUserExpAccount
     * @param bidAmount
     */
    void createExpAccountFlow(ExpAccount bidUserExpAccount, BigDecimal bidAmount);
}
